package pages;


import core.TestBase;
import org.openqa.selenium.By;
import utils.Log4Test;

/**
 * Created by Nicktoris on 15.07.2014.
 */
public class HomePage extends TestBase {
    protected By searchNotebookLink =
            By.xpath("//ul[@class='main-page-m-catalog-subl']//a[@href='http://rozetka.com.ua/notebooks/c80004/']");
    private String URL = "http://rozetka.com.ua/";

    public void open() {
        webDriver.get(URL);
        Log4Test.info("Open WebUrl " + URL);
    }

    public boolean isOpened() {
        return webDriver.getCurrentUrl().equals(URL);
    }

    public void openProductLink() {

        Log4Test.info("Open product link ");
        Element = webDriver.findElement(searchNotebookLink);
        Element.click();
    }

}
